package com.haima.user.controller;

import com.haima.common.security.annotation.RequiresPermissions;
import com.haima.user.domain.SysUsers;
import com.haima.user.service.tb.SysUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* (sys_users)表控制层
*
* @author zkh
*/
@RestController
@RequestMapping("/users")
public class SysUsersController {
/**
* 服务对象
*/
    @Autowired
    private SysUsersService sysUsersService;

    /**
    * 通过主键查询单条数据
    *
    * @param id 主键
    * @return 单条数据
    */
    @RequiresPermissions(value = "user:users:detail")
    @GetMapping("selectOne")
    public SysUsers selectOne(Integer id) {
        return sysUsersService.getById(id);
    }

}
